import memberApi from "@/api/declaration/mall/memberApi"
import httpRequest from "@/config/axios/httpRequest"
import { SignInUserModel } from "@/models/mall/SignInConfigModel"


// 查询会员用户列表
export const getUserPage = async (params) => {
  return await httpRequest.get(memberApi.GetUserPage, { params })
}

// 查询会员用户详情
export const getUser = async (id: number) => {
  return await httpRequest.get(memberApi.GetUser, { params: { id } })
}

// 修改会员用户
export const updateUser = async (data: SignInUserModel) => {
  return await httpRequest.put(memberApi.UpdateUser, data)
}

// 修改会员用户等级
export const updateUserLevel = async (data: any) => {
  return await httpRequest.put(memberApi.UpdateUserLevel, data)
}

// 修改会员用户积分
export const updateUserPoint = async (data: any) => {
  return await httpRequest.put(memberApi.UpdateUserPoint, data)
}
